﻿{% extends 'index.html' %}
{% load i18n %}
{% block center-col %}


{% if messages %}
<ul class="messages" style="list-style:none ;">
    {% for message in messages %}
    <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
    {% endfor %}
</ul>
{% endif %}

{%if forbidden  %}
        غير مصرح لك برؤية هذا بالملف
        <a href="/ar/accounts/signin/" >تسجيل الدخول </a>
{%else%}


<style>
#box-nav  {margin: 0; padding: 0; 
	list-style-type: none; list-style-image: none; }

#box-nav  li {display: inline; width: 50px; }
#box-nav  a {text-decoration:none; color: blue; width:80% }
#box-nav  a:hover {color: purple; }
#box-nav li a:hover {color: purple;
	background: yellow; }
</style>
<div class="white-box">

  {% comment %}Dirty hack. Will use django-guardian in the future.{% endcomment %}
  
  
        {% if profile.user.get_full_name %}
    
   <h3> {{ profile.user.first_name }} {{profile.middle_name}}  {{ profile.user.last_name }}</h3>
    {% endif %}
    
    
  {% if user.username == profile.user.username %}

    
    
  <ul id="box-nav">
    <li><a href="{% url userena_profile_detail user.username %}">{% trans "View profile" %} </a></li>
    <li><a href="{% url userena_profile_edit user.username %}">{% trans "Edit details" %} </a></li>
    <li><a href="{% url userena_password_change user.username %}">{% trans "Change password" %} </a></li>
  </ul>
  {% endif %}

  <div id="details">
    <img src="{{ profile.get_mugshot_url }}" alt="{% trans "Your mugshot" %}" />

    {% if profile.myteam.name%}
  <p>     {%trans "team" %}     {{ profile.myteam.name}} in {{ profile.myteam.city.name}} </p>
    {%endif%}
   {% if  profile.mobile and profile.gender == 1 and request.user.get_profile.gender == 1 %}
  <p>     {%trans  "Mobile" %}  : {{ profile.mobile }} </P>
    {% endif %}
    
       {% if profile.gender == 0  %}
  <p>     {%trans  "Mobile" %}  : {{ profile.mobile }} </P>
    {% endif %}
    
    
    {% if profile.user.email %}
    <p><strong>{% trans "Email" %}</strong><br />{{ profile.user.email }}</p>
    {% endif %}
    {% if profile.age %}
    <p><strong>{% trans "Age" %}</strong><br /> {{ profile.age }}</p>
    {% endif %}
    {% if profile.website %}
    <p><strong>{% trans "Website" %}</strong><br /> <a href="{{ profile.website }}">{{ profile.website }}</a></p>
    {% endif %}
    {% if profile.location %}
    <p><strong>{% trans "Location" %}</strong><br />{{ profile.location }}</p>
    {% endif %}
    {% if profile.about_me %}
    <p><strong>{% trans "About me" %}</strong><br />{{ profile.about_me }}</p>
    {% endif %}
  </div>
</div>

  {% if not  user.username == profile.user.username %}

    
        <a href="/accounts/signup" ><button class="join-us" >  انضم لنفس العشيرة </button>   </a>
        
        {% endif %}
{%endif%}
{% endblock %}